package com.gears_software.sxdc.dccx.ui.view;

import android.content.Context;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.gears_software.sxdc.dccx.R;
import com.gears_software.sxdc.dccx.data.finder.IBankFinder;
import com.gears_software.sxdc.dccx.data.model.ResultModel;
import com.gears_software.sxdc.dccx.data.model.TransactionRecord;

import org.androidannotations.annotations.Background;
import org.androidannotations.annotations.EViewGroup;
import org.androidannotations.annotations.ViewById;
import org.androidannotations.rest.spring.annotations.RestService;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * Created by SunMuran on 2017/8/4.
 */
@EViewGroup(R.layout.item_view_liushui)
public class LiuShuiListItemView extends LinearLayout {
    @ViewById
    TextView tv_pingche;
    @ViewById
    TextView tv_qian;
    @ViewById
    TextView tv_date;
    @RestService
    IBankFinder iBankFinder;
    public LiuShuiListItemView(Context context) {
        super(context);
    }
    public void bind(TransactionRecord model) {
        tv_pingche.setText(model.getTradinginstructions());
        Date date = model.getCreate_date();
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String str = df.format(date);
        tv_date.setText(str);
        tv_qian.setText(model.getAmountstr());
    }
}
